package com.scalar.chiptrack.operations.dataentry.inventoryTransit.actioncommands;

import com.scalar.chiptrack.actioncommands.ActionCommand;

/**
 * Created by IntelliJ IDEA.
 * User: munugoti
 * Date: 19 Feb, 2010
 * Time: 10:12:27 AM
 */
public class InventoryOutTransactionActionCommandFactory {
    private InventoryOutTransactionActionCommandFactory()
    {
    }

    public static ActionCommand getActionCommand(String action)
    {

        if (action == null || "processTypes".equalsIgnoreCase(action))
        {
            return new InventoryOutTransactionLoadPsTypesCommand();
        }
        else if ("search".equalsIgnoreCase(action) )
        {
            return new InventoryOutTransactionSearchCommand();
        }
        else if ("lotNumbers".equalsIgnoreCase(action))
        {
            return new InventoryOutTransactionLoadLotNumbersCommand();
        }
        else if ("save".equalsIgnoreCase(action) || "confirm".equalsIgnoreCase(action) )
        {
            return new InventoryOutTransactionSaveCommand();
        }
        else if ("preGrindsearch".equalsIgnoreCase(action) || "preGrindsave".equalsIgnoreCase(action) || "preGrindconfirm".equalsIgnoreCase(action) )
        {
            return new PreGrindDisposeSearchCommand();
        }
        else if ("programOutsearch".equalsIgnoreCase(action) )
        {
            return new ProgramOutTransactionSearchCommand();
        }
        else if ("programOutlotNumbers".equalsIgnoreCase(action) )
        {
            return new ProgramOutTransactionLoadLotNumbersCommand();
        }
        else if ("programOutsave".equalsIgnoreCase(action) || "programOutconfirm".equalsIgnoreCase(action) )
        {
            return new ProgramOutTransactionSaveCommand();
        }

        return null;
    }
}
